import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
import { getmenu } from '../api/MenuApi'

export const useMenu = defineStore('menu', {
    state: () => ({
        menulist: []
    }),
    actions: {
        async getMenulist() {
            let res = await getmenu()
            if (res.data.code == 0) {
                this.menulist = res.data.data
            }
        }
    }
})